home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Franz PD / Franz PD Disk #334 (1994-06)(Rhein-Sieg-Soft).zip / Franz PD Disk #334 (1994-06)(Rhein-Sieg-Soft).adf / ASo-Tools / Sources / Guru.c < prev    next >
C/C++ Source or Header  |  1994-04-03  |  18KB  |  351 lines

  1. /* Guru.c */
  2.  
  3. /* dekodiert Guru-Botschaften, soweit bekannt */
  4.  
  5. #include <exec/alerts.h>
  6. #include <stdio.h>
  7. #include <string.h>
  8. #include <ctype.h>
  9.  
  10. short readxdigit;
  11.  
  12. short doreadxdigit(char c)
  13. {
  14.     if((c>='0') && (c<='9'))        readxdigit=c-'0';
  15.     else if(('A'<=c) && (c<='F'))   readxdigit=c-'A'+10;
  16.     else if(('a'<=c) && (c<='f'))   readxdigit=c-'a'+10;
  17.     else                return(1);
  18.     return(0);
  19. }
  20.  
  21. unsigned long HexVal(char *arg)
  22. { /* returns the value of the given 8digit-hex-string, ignoring a leading
  23.     '#', or 0 for fault */
  24.     unsigned long zwerg;
  25.     short cnt;
  26.  
  27.     if(*arg=='#')   ++arg;
  28.     for(cnt=zwerg=0; cnt<8; ++cnt)
  29.     {
  30.     if(*arg==0)                 return(zwerg);
  31.     if(doreadxdigit(*(arg++)))  return(0);
  32.     zwerg=zwerg*16+readxdigit;
  33.     }
  34.     return(zwerg);
  35. }
  36.  
  37. void puts(const char *txt) { printf("%s\n", txt); }
  38.  
  39. short comment(unsigned long guru)
  40. {   /* ergibt 0, falls der Guru nicht direkt bekannt ist und 1 falls doch. */
  41.     /* dadurch ist es möglich, das Flag AT_DeadEnd bei Bedarf zu invertieren */
  42.     /* im Übrigen wird - soweit bekannt - ein Kommentartext ausgegeben */
  43.     char *txt=NULL;
  44.     short trial=0;
  45.  
  46. retry:
  47.     switch(guru)
  48.     {
  49.     case AN_ExcptVect: txt="ExcptVect: OBSOLETE: 68000 exception vector checksum"; break;
  50.     case AN_BaseChkSum: txt="BaseChkSum: OBSOLETE: ExecBase checksum bad"; break;
  51.     case AN_LibChkSum: txt="LibChkSum: Library checksum failure"; break;
  52.     case 0x81000004: txt="LibMem: most OBSOLETE, no more documented"; break;
  53.     case AN_MemCorrupt: txt="MemCorrupt: Corrupted memory list detected by Exec.FreeMem()"; break;
  54.     case AN_IntrMem: txt="IntrMem: No memory for interrupt servers"; break;
  55.     case AN_InitAPtr: txt="InitAPtr: OBSOLETE: InitStruct() of an APTR source"; break;
  56.     case AN_SemCorrupt: txt="SemCorrupt: A semaphore is in an illegal state at Exec.RemSemaphore()"; break;
  57.     case AN_FreeTwice: txt="FreeTwice: Exec.FreeMem() on already freed memory"; break;
  58.     case AN_BogusExcpt: txt="BogusExcpt: OBSOLETE: Illegal 68k-exception"; break;
  59.     case AN_IOUsedTwice: txt="IOUsedTwice: Attempt to reuse open IORequest"; break;
  60.     case AN_MemoryInsane: txt="MemoryInsane: Sanity check of memory list during Exec.AvailMem(MEMF_LARGEST)\n\tfailed"; break;
  61.     case AN_IOAfterClose: txt="IOAfterClose: IO attempted on a closed IORequest"; break;
  62.     case AN_StackProbe: txt="StackProbe: Stack-over-/under-flow"; break;
  63.     case AN_BadFreeAddr: txt="BadFreeAddr: Memory header not located [usually caused by an invalid address\n\tpassed to Exec.FreeMem]"; break;
  64.     case AN_GfxNoMem: txt="GfxNoMem: graphics.library runs out of memory"; break;
  65.     case AN_GfxNoMemMspc: txt="GfxNoMemMspc: graphics.library runs out of memory trying to allocate\n\tMonitorSpec"; break;
  66.     case 0x82010002: txt="CopInstr: OBSOLETE: lack of memory for copperlist"; break;
  67.     case 0x82000003: case 0x82010003: txt="CopListOver: OBSOLETE: overflow of copperlist"; break;
  68.     case 0x82000004: case 0x82010004: txt="CopIListOver: OBSOLETE: error on copperlist ???"; break;
  69.     case 0x82010005: txt="CopListHead: OBSOLETE: lack of memory for copperlist-head"; break;
  70.     case AN_LongFrame: txt="LongFrame: no memory for long-frame-copperlist"; break;
  71.     case AN_ShortFrame: txt="ShortFrame: no memory for short-frame-copperlist"; break;
  72.     case 0x82010008: txt="FloodFill: OBSOLETE: no memory for Graphics.FloodFill()"; break;
  73.     case AN_TextTmpRas: txt="TextTmpRas: no memory for TmpRas within Graphics.Text()"; break;
  74.     case AN_BltBitMap: txt="BltBitMap: no memory for Graphics.BltBitMap()"; break;
  75.     case AN_RegionMemory: txt="RegionMemory: no memory for Regions"; break;
  76.     case AN_MakeVPort: txt="MakeVPort: no memory to create a ViewPort"; break;
  77.     case AN_GfxNewError: txt="GfxNewError: undocumented"; break;
  78.     case AN_GfxFreeError: txt="GfxFreeError: undocumented"; break;
  79.     case AN_GfxNoLCM: txt="GfxNoLCM: no emergency-memory available"; break;
  80.     case AN_ObsoleteFont: txt="ObsoleteFont: unsupported font description used"; break;
  81.     case AN_LayersNoMem: txt="LayersNoMem: layers.library runs out of memory"; break;
  82.     case AN_GadgetType: txt="GadgetType: unknown gadget type"; break;
  83.     case AN_BadGadget: txt="BadGadget: unknown gadget type"; break;
  84.     case AN_CreatePort: txt="CreatePort: no memory to create a ???-port"; break;
  85.     case AN_ItemAlloc: txt="ItemAlloc: no memory to allocate a(n) [Menu-?] item"; break;
  86.     case AN_SubAlloc: txt="SubAlloc: no memory to allocate a [Menu-] sub [-item?]"; break;
  87.     case AN_PlaneAlloc: txt="PlaneAlloc: no memory to allocate [a Bitplane ?]"; break;
  88.     case AN_ItemBoxTop: txt="ItemBoxTop: item box top < 0"; break;
  89.     case AN_OpenScreen: txt="OpenScreen: no memory to alloc in OpenScreen()"; break;
  90.     case AN_OpenScrnRast: txt="OpenOpenScrnRast: no memory to alloc as raster [or RastPort ?] in OpenScreen()"; break;
  91.     case AN_SysScrnType: txt="SysScrnType: unknown screen type in OpenScreen()"; break;
  92.     case AN_AddSWGadget: txt="AddSWGadget: no memory to add SW[?]-Gadgets"; break;
  93.     case AN_OpenWindow: txt="OpenWindow: no memory to alloc in OpenWindow()"; break;
  94.     case AN_BadState: txt="BadState: \"Bad State Return entering Intuition\" [?]"; break;
  95.     case AN_BadMessage: txt="BadMessage: bad message recieved by IDCMP"; break;
  96.     case AN_WeirdEcho: txt="WeirdEcho: \"Weird echo causing incomprehension\" [?]"; break;
  97.     case AN_NoConsole: txt="NoConsole: intuition couldn't open the console.device"; break;
  98.     case AN_StartMem: txt="StartMem: dos.library gets no memory at startup"; break;
  99.     case AN_EndTask: txt="EndTask: \"EndTask didn't\" [?]"; break;
  100.     case AN_QPktFail: txt="QPktFail: \"QPktFail failure\" [?]"; break;
  101.     case AN_AsyncPkt: txt="AsyncPkt: unexpected packet recieved"; break;
  102.     case AN_FreeVec: txt="FreeVec: FreeVec failed [?]"; break;
  103.     case AN_DiskBlkSeq: txt="DiskBlkSeq: Disk block sequence error"; break;
  104.     case AN_BitMap: txt="BitMap: Bitmap corrupt"; break;
  105.     case AN_KeyFree: txt="KeyFree: Key already free"; break;
  106.     case AN_BadChkSum: txt="BadChkSum: Invalid checksum"; break;
  107.     case AN_DiskError: txt="DiskError: Disk Error - ?"; break;
  108.     case AN_KeyRange: txt="KeyRange: Key out of range"; break;
  109.     case AN_BadOverlay: txt="BadOverlay: Bad overlay"; break;
  110.     case AN_BadInitFunc: txt="BadInitFunc: invalid init packer for cli/shell"; break;
  111.     case AN_FileReclosed: txt="FileReclosed: a filehandle was closed more than once"; break;
  112.     case AN_BadSegList: txt="BadSegList: overlay in library seglists are not allowed"; break;
  113.     case AN_BadExpansionFree: txt="BadExpansionFree: freeed free region"; break;
  114.     case AN_NoWindow: txt="NoWindow: console.device can't open the initial window"; break;
  115.     case AN_TDCalibSeek: txt="TDCalibSeek: \"calibrate: seek error\" [?]"; break;
  116.     case AN_TDDelay: txt="TDDelay: delay: error on timer wait"; break;
  117.     case AN_TMBadReq: txt="TMBadReq: bad request"; break;
  118.     case AN_TMBadSupply: txt="TMBadSupply: power-supply: no 50/60Hz ticks"; break;
  119.     case AN_DRHasDisk: txt="DRHasDisk: disk.resource.GetUnit(): ? already has disk"; break;
  120.     case AN_DRIntNoAct: txt="DRIntNoAct: interrupt: no active unit"; break;
  121.     case AN_BootError: txt="BootError: boot code returned an error"; break;
  122.     case AN_NoFonts: txt="NoFonts of workbench [undocumented]"; break;
  123.     case AN_WBBadStartupMsg1: txt="WBBadStartupMsg1 of workbench [undocumented]"; break;
  124.     case AN_WBBadStartupMsg2: txt="WBBadStartupMsg2 of workbench [undocumented]"; break;
  125.     case AN_WBBadIOMsg: txt="WBBadIOMsg of workbench [undocumented]"; break;
  126.     case AN_WBInitPotionAllocDrawer: txt="WBInitPotionAllocDrawer of workbench [undocumented]"; break;
  127.     case AN_WBCreateWBMenusCreateMenus1: txt="WBCreateWBMenusCreateMenus1 of workbench [undocumented]"; break;
  128.     case AN_WBCreateWBMenusCreateMenus2: txt="WBCreateWBMenusCreateMenus2 of workbench [undocumented]"; break;
  129.     case AN_WBLayoutWBMenusLayoutMenus: txt="WBLayoutWBMenusLayoutMenus of workbench [undocumented]"; break;
  130.     case AN_WBAddToolMenuItem: txt="WBAddToolMenuItem of workbench [undocumented]"; break;
  131.     case AN_WBReLayoutToolMenu: txt="WBReLayoutToolMenu of workbench [undocumented]"; break;
  132.     case AN_WBinitTimer: txt="WBInitTimer of workbench [undocumented]"; break;
  133.     case AN_WBInitLayerDemon: txt="WBInitLayerDemon of workbench [undocumented]"; break;
  134.     case AN_WBinitWbGels: txt="WBInitWbGels of workbench [undocumented]"; break;
  135.     case AN_WBInitScreenAndWindows1: txt="WBInitScreenAndWindows1 of workbench [undocumented]"; break;
  136.     case AN_WBInitScreenAndWindows2: txt="WBInitScreenAndWindows2 of workbench [undocumented]"; break;
  137.     case AN_WBInitScreenAndWindows3: txt="WBInitScreenAndWindows3 of workbench [undocumented]"; break;
  138.     case AN_WBMAlloc: txt="WBMAlloc of workbench [undocumented]"; break;
  139.     }
  140.     if(txt)
  141.     {
  142.     if(trial)   printf("AT_DeadEnd ^ ");
  143.     puts(txt);
  144.     return(1);
  145.     }
  146.     else{
  147.     if(++trial>1)   return(0);
  148.     guru ^= AT_DeadEnd;
  149.     goto retry;
  150.     }
  151. }
  152.  
  153. void main(int argc, char *argv[])
  154. {
  155.     unsigned long guru;
  156.  
  157.     for(int cnt=1; cnt<argc; ++cnt)
  158.     {
  159.     if((guru=HexVal(argv[cnt]))==0)
  160.         {
  161.         if((strcmp(argv[cnt], "00000000")!=0) &&
  162.            (strcmp(argv[cnt],"#00000000")!=0) )
  163.         {
  164.         printf("Invalid Guru Code %s\n", argv[cnt]);
  165.         continue;
  166.         }
  167.         }
  168.     printf("Guru #%08lx:\n", guru);
  169.     if((guru&~0x80000000)<256)
  170.       {
  171.       guru &= ~0x80000000;
  172.       if(guru>1)    printf("CPU-exception #");
  173.       switch(guru)
  174.         {
  175.         case 0x00:    puts("\
  176. unknown guru [looks like CPU-exception #0, which doesn't exist but its vector\n\
  177. \tcontains the SSP-value for a reset]");    break;
  178.         case 0x01:    puts("\
  179. unknown guru [looks like CPU-exception #1, which doesn't exist but its vector\n\
  180. \tcontains the PC-value for a reset]");     break;
  181.         case 0x02:    puts("2: bus-error [e.g. invalid address]"); break;
  182.         case 0x03:    puts("3: (long-)word access on odd address"); break;
  183.         case 0x04:    puts("4: opcode 'ILLEGAL'"); break;
  184.         case 0x05:    puts("5: division by zero"); break;
  185.         case 0x06:    puts("6: caused by opcode 'CHK'"); break;
  186.         case 0x07:    puts("7: caused by opcode 'TRAPV'"); break;
  187.         case 0x08:    puts("8: privilege violation\n\
  188. \t[privileged opcode was used in UserMode]"); break;
  189.         case 0x09:    puts("9: trace-bit was set [do we have an impotent debugger ?]"); break;
  190.         case 0x0a:    puts("A: opcode $Axxx"); break;
  191.         case 0x0b:    puts("B: opcode $Fxxx"); break;
  192.         case 0x0e:    puts("E: faulty stack-frame [not 68000]"); break;
  193.         case 0x0f:    puts("F: uninitialized irq-vector: irq caused by perepherial,\n\
  194. \tbut no vector given"); break;
  195.         case 0x18:    puts("18: spurious irq: irq & bus-error at the same time"); break;
  196.         case 0x19:    case 0x1a:  case 0x1b:    case 0x1c:
  197.         case 0x1d:    case 0x1e:  case 0x1f:
  198.             printf("%02lx: should be an irq of level #%ld !\n",
  199.                    guru, guru-24);
  200.             break;
  201.         case 0x20:    case 0x21:  case 0x22: case 0x23:
  202.         case 0x24:    case 0x25:  case 0x26: case 0x27:
  203.         case 0x28:    case 0x29:  case 0x2a: case 0x2b:
  204.         case 0x2c:    case 0x2d:  case 0x2e: case 0x2f:
  205.             printf("%02lx: opcode 'TRAP #%ld'\n",
  206.                    guru, guru-32);
  207.             break;
  208.         case 0x40:    case 0x41:  case 0x42:    case 0x43:
  209.         case 0x44:    case 0x45:  case 0x46:    case 0x47:
  210.         case 0x48:    case 0x49:  case 0x4a:    case 0x4b:
  211.         case 0x4c:    case 0x4d:  case 0x4e:    case 0x4f:
  212.         case 0x50:    case 0x51:  case 0x52:    case 0x53:
  213.         case 0x54:    case 0x55:  case 0x56:    case 0x57:
  214.         case 0x58:    case 0x59:  case 0x5a:    case 0x5b:
  215.         case 0x5c:    case 0x5d:  case 0x5e:    case 0x5f:
  216.         case 0x60:    case 0x61:  case 0x62:    case 0x63:
  217.         case 0x64:    case 0x65:  case 0x66:    case 0x67:
  218.         case 0x68:    case 0x69:  case 0x6a:    case 0x6b:
  219.         case 0x6c:    case 0x6d:  case 0x6e:    case 0x6f:
  220.         case 0x70:    case 0x71:  case 0x72:    case 0x73:
  221.         case 0x74:    case 0x75:  case 0x76:    case 0x77:
  222.         case 0x78:    case 0x79:  case 0x7a:    case 0x7b:
  223.         case 0x7c:    case 0x7d:  case 0x7e:    case 0x7f:
  224.         case 0x80:    case 0x81:  case 0x82:    case 0x83:
  225.         case 0x84:    case 0x85:  case 0x86:    case 0x87:
  226.         case 0x88:    case 0x89:  case 0x8a:    case 0x8b:
  227.         case 0x8c:    case 0x8d:  case 0x8e:    case 0x8f:
  228.         case 0x90:    case 0x91:  case 0x92:    case 0x93:
  229.         case 0x94:    case 0x95:  case 0x96:    case 0x97:
  230.         case 0x98:    case 0x99:  case 0x9a:    case 0x9b:
  231.         case 0x9c:    case 0x9d:  case 0x9e:    case 0x9f:
  232.         case 0xa0:    case 0xa1:  case 0xa2:    case 0xa3:
  233.         case 0xa4:    case 0xa5:  case 0xa6:    case 0xa7:
  234.         case 0xa8:    case 0xa9:  case 0xaa:    case 0xab:
  235.         case 0xac:    case 0xad:  case 0xae:    case 0xaf:
  236.         case 0xb0:    case 0xb1:  case 0xb2:    case 0xb3:
  237.         case 0xb4:    case 0xb5:  case 0xb6:    case 0xb7:
  238.         case 0xb8:    case 0xb9:  case 0xba:    case 0xbb:
  239.         case 0xbc:    case 0xbd:  case 0xbe:    case 0xbf:
  240.         case 0xc0:    case 0xc1:  case 0xc2:    case 0xc3:
  241.         case 0xc4:    case 0xc5:  case 0xc6:    case 0xc7:
  242.         case 0xc8:    case 0xc9:  case 0xca:    case 0xcb:
  243.         case 0xcc:    case 0xcd:  case 0xce:    case 0xcf:
  244.         case 0xd0:    case 0xd1:  case 0xd2:    case 0xd3:
  245.         case 0xd4:    case 0xd5:  case 0xd6:    case 0xd7:
  246.         case 0xd8:    case 0xd9:  case 0xda:    case 0xdb:
  247.         case 0xdc:    case 0xdd:  case 0xde:    case 0xdf:
  248.         case 0xe0:    case 0xe1:  case 0xe2:    case 0xe3:
  249.         case 0xe4:    case 0xe5:  case 0xe6:    case 0xe7:
  250.         case 0xe8:    case 0xe9:  case 0xea:    case 0xeb:
  251.         case 0xec:    case 0xed:  case 0xee:    case 0xef:
  252.         case 0xf0:    case 0xf1:  case 0xf2:    case 0xf3:
  253.         case 0xf4:    case 0xf5:  case 0xf6:    case 0xf7:
  254.         case 0xf8:    case 0xf9:  case 0xfa:    case 0xfb:
  255.         case 0xfc:    case 0xfd:  case 0xfe:    case 0xff:
  256.             printf("%02lx: should be an irq-vector\n",
  257.                    guru);
  258.             break;
  259.         case 0x0c:    case 0x0d:
  260.         case 0x10:    case 0x11:  case 0x12:    case 0x13:
  261.         case 0x14:    case 0x15:  case 0x16:    case 0x17:
  262.         case 0x30:    case 0x31:  case 0x32:    case 0x33:
  263.         case 0x34:    case 0x35:  case 0x36:    case 0x37:
  264.         case 0x38:    case 0x39:  case 0x3a:    case 0x3b:
  265.         case 0x3c:    case 0x3d:  case 0x3e:    case 0x3f:
  266.         printf("%02lx: unknown CPU-exception\n", guru); break;
  267.         }
  268.       }
  269.     else{ /* Library-caused Gurus: */
  270.         if(!comment(guru))
  271.         {
  272.         puts("unknown guru");
  273.         if(guru & AT_DeadEnd)   printf("DeadEnd-Alert");
  274.         else            printf("Recovery-Alert");
  275.         switch(guru & 0x7f000000)
  276.             {
  277.             case 0: printf(", might be CPU-caused"); break;
  278.             case AN_ExecLib: printf(" within exec.library"); break;
  279.             case AN_GraphicsLib: printf(" within graphics.library"); break;
  280.             case AN_LayersLib: printf(" within layers.library"); break;
  281.             case AN_Intuition: printf(" within intuition.library"); break;
  282.             case AN_MathLib: printf(" within a maths library"); break;
  283.             case AN_DOSLib: printf(" within dos.library"); break;
  284.             case AN_RAMLib: printf(" within ramlib.library"); break;
  285.             case AN_IconLib: printf(" within icon.library"); break;
  286.             case AN_ExpansionLib: printf(" within expansion.library"); break;
  287.             case AN_DiskfontLib: printf(" within diskfont.library"); break;
  288.             case AN_AudioDev: printf(" within audio.device"); break;
  289.             case AN_ConsoleDev: printf(" within console.device"); break;
  290.             case AN_GamePortDev: printf(" within gameport.device"); break;
  291.             case AN_KeyboardDev: printf(" within keyboard.device"); break;
  292.             case AN_TrackDiskDev: printf(" within trackdisk.device"); break;
  293.             case AN_TimerDev: printf(" within timer.device"); break;
  294.             case AN_CIARsrc: printf(" within cia?.resource"); break;
  295.             case AN_DiskRsrc: printf(" within disk.resource"); break;
  296.             case AN_MiscRsrc: printf(" within misc.resource"); break;
  297.             case AN_BootStrap: printf(" within bootstrap"); break;
  298.             case AN_Workbench: printf(" within workbench"); break;
  299.             case AN_DiskCopy: printf(" within DiskCopy"); break;
  300.             case AN_GadTools: printf(" within gadtools.library"); break;
  301.             case AN_UtilityLib: printf(" within utility.library"); break;
  302.             case AN_Unknown: printf(", application-specific"); break;
  303.             }
  304.           switch(guru & 0x00ff0000)
  305.             {
  306.             case AG_NoMemory: printf(" about lack of memory"); break;
  307.             case AG_MakeLib: printf(" about making a library"); break;
  308.             case AG_OpenLib: printf(" about opening a library"); break;
  309.             case AG_OpenDev: printf(" about opening a device"); break;
  310.             case AG_OpenRes: printf(" about opening a resource"); break;
  311.             case AG_IOError: printf(" about an IO-error"); break;
  312.             case AG_NoSignal: printf(" about allocating a signal"); break;
  313.             case AG_BadParm: printf(" about bad parameters"); break;
  314.             case AG_CloseLib: printf(" about closing a library [probably too many closes or a mismatched close]"); break;
  315.             case AG_CloseDev: printf(" about closing a device [probably too many closes or a mismatched close]"); break;
  316.             case AG_ProcCreate: printf(" about a failed process creation"); break;
  317.             }
  318.           switch(guru & 0x0000ffff)
  319.             {
  320.             case AO_ExecLib: printf(" on exec.library"); break;
  321.             case AO_GraphicsLib: printf(" on graphics.library"); break;
  322.             case AO_LayersLib: printf(" on layers.library"); break;
  323.             case AO_Intuition: printf(" on intuition.library"); break;
  324.             case AO_MathLib: printf(" on a mathematical library"); break;
  325.             case AO_DOSLib: printf(" on dos.library"); break;
  326.             case AO_RAMLib: printf(" on ramlib.library"); break;
  327.             case AO_IconLib: printf(" on icon.library"); break;
  328.             case AO_ExpansionLib: printf(" on expansion.library"); break;
  329.             case AO_DiskfontLib: printf(" on diskfont.library"); break;
  330.             case AO_UtilityLib: printf(" on utility.library"); break;
  331.             case AO_AudioDev: printf(" on audio.device"); break;
  332.             case AO_ConsoleDev: printf(" on console.device"); break;
  333.             case AO_GamePortDev: printf(" on gameport.device"); break;
  334.             case AO_KeyboardDev: printf(" on keyboard.device"); break;
  335.             case AO_TrackDiskDev: printf(" on trackdisk.device"); break;
  336.             case AO_TimerDev: printf(" on timer.device"); break;
  337.             case AO_CIARsrc: printf(" on cia?.resource"); break;
  338.             case AO_DiskRsrc: printf(" on disk.resource"); break;
  339.             case AO_MiscRsrc: printf(" on misc.resource"); break;
  340.             case AO_BootStrap: printf(" on bootstrap"); break;
  341.             case AO_Workbench: printf(" on Workbench"); break;
  342.             case AO_DiskCopy: printf(" on DiskCopy"); break;
  343.             case AO_GadTools: printf(" on gadtools.library"); break;
  344.             case AO_Unknown: printf(" on something else"); break;
  345.             }
  346.         printf("\n");
  347.         }
  348.         }
  349.     }
  350. }
  351.